<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition template="template.xhtml">
	<ui:define name="corpo">

		<h2>Sistema Estatistico</h2>
		<h:form id="form">
			<h:outputFormat
				value="Quantidade de pessoas que responderam: #{graficoBean.usuarios.size()}" />

			<p:dataGrid value="#{graficoBean.questoes}" var="modelo" columns="1"
				style="width:100%;height:300px">
				<p:panelGrid columns="2" style="width:100%;height:300px">
					<f:facet name="header">#{modelo.enunciado}<br></br>
					</f:facet>

					<p:column>
						<p:pieChart value="#{graficoBean.testeHash.get(modelo.id)}"
							showDatatip="true" showDataLabels="true" fill="false"
							style="width:100%;height:300px" sliceMargin="6"
							legendPosition="w" />
					</p:column>
					<p:column>
						<p:barChart
							value="#{graficoBean.graficoCartesiano.get(modelo.id)}"
							showDatatip="true" showDataLabels="true"
							datatipFormat="#{graficoBean.datatipFormatIntegers}"
							style="width:100%;height:300px" sliceMargin="6"
							legendPosition="ne" />
					</p:column>
				</p:panelGrid>
			</p:dataGrid>

		</h:form>

	</ui:define>
</ui:composition>
</html>